package entity;

import javax.xml.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by alexander.makalov on 23.10.2014.
 */
@XmlRootElement(name = "hibernate-configuration")
public class UserConnectData {

    public SSFactory getSsFactoryItem() {
        if (ssFactoryItem == null) ssFactoryItem = new SSFactory();
        return ssFactoryItem;
    }

    public void setSsFactoryItem1(SSFactory ssFactoryItem) {
        this.ssFactoryItem = ssFactoryItem;
    }

    @XmlElement(name = "session-factory")
    public SSFactory ssFactoryItem;

    public static class SSFactory {
        public List<SessionFactoryItem> sessionFactoryItems() {
            if (sessionFactoryItems == null) sessionFactoryItems = new ArrayList<>();
            return sessionFactoryItems;
        }

        public void sessionFactoryItems(List<SessionFactoryItem> pr2) {
            if (pr2 == null) pr2 = new ArrayList<>();
            this.sessionFactoryItems = pr2;
        }

        @XmlElement(name = "property")
        List<SessionFactoryItem> sessionFactoryItems;

        public List<SessionFactoryMappingItem> getSessionFactoryMappingItem() {
            return sessionFactoryMappingItem;
        }

        public void setSessionFactoryMappingItems(List<SessionFactoryMappingItem> sessionFactoryMappingItem) {
            this.sessionFactoryMappingItem = sessionFactoryMappingItem;
        }

        @XmlElement(name = "mapping")
        List<SessionFactoryMappingItem> sessionFactoryMappingItem;
    }

    public static class SessionFactoryMappingItem {

        public String getAttrbuteSring() {
            return attrbuteSring;
        }

        public void setStr(String str) {
            this.attrbuteSring = str;
        }

        @XmlAttribute(name = "class")
        String attrbuteSring;
    }

    public static class SessionFactoryItem {

        public String getAttrbuteSring() {
            return attrbuteSring;
        }

        public String getValueString() {
            return valueString;
        }

        public void setStr(String str) {
            this.attrbuteSring = str;
        }

        public void setStr2(String str2) {
            this.valueString = str2;
        }

        @XmlAttribute(name = "name")
        String attrbuteSring;

        @XmlValue
        String valueString;
    }
}
